<script language="vbscript">

来源:百度知道 编辑:UC知道 时间:2024/05/16 07:41:46
<script language="vbscript">
Dim secondDiff
Sub SetTime(serverDateTime)
clientDateTime = Now()
secondDiff = DateDiff("s", clientDateTime, serverDateTime)
oInterval = setInterval("UpdateTime()", 1000)
End Sub
Sub UpdateTime()
Dim curDate,curTime,arrTmp
curDate=DateAdd("s", secondDiff, Now())
arrTmp=split(curDate," ")
curTime=arrTmp(1)
CurrentTime.innerText = "当前时间:"&curTime
If (CStr(curTime)="10:00:00") Then
window.location.href="index.asp"
End If
End Sub
</script>

<%@ Language=VBScript %>
<html>
<title>
本站主页
</title>
<body>

<script language="vbscript">
<%
Dim secondDiff
Sub SetTime(serverDateTime)
clientDateTime = Now()
secondDiff = DateDiff("s", clientDateTime, serverDateTime)
oInterval = setInterval("UpdateTime()", 1000)
End Sub
Sub UpdateTime()
Dim curDate,curTime,arrTmp
curDate=DateAdd("s", secondDiff, Now())
arrTmp=split(curDate," ")
curTime=arrTmp(1)
CurrentTime.innerText = "当前时间:"&curTime
If (CStr(curTime)="10:00:00") Then
window.location.href="index.asp"
End If
End Sub
%>
</script>
</body>
</html>

正确的